#ifndef ENDFOCENTRALDIRECTORY_H
#define	ENDFOCENTRALDIRECTORY_H

const unsigned int EOCDIRECTORYSIGNATURE = 0x06054b50;

struct EndOfCentralDirectory
{
    EndOfCentralDirectory();
    ~EndOfCentralDirectory();
    
    unsigned int eocDirSignature_;
    
    // The number of this disk (diskette,cd, dvd), which contains central directory end record.
    unsigned short numOfThisDisk_;
    
    // The number of the disk (diskette,cd, dvd) on which the central directory starts.
    unsigned short centralDirStartOnDisk_;
    
    // The number of central directory entries on this disk (diskette,cd, dvd).
    unsigned short numOfcentralDirRecordsOnThisDisk_;
    
    // The total number of central directory entries.
    unsigned short totalNumOfcentralDirRecords_;
    
    // The size (in bytes) of the central directory (all central directory headers).
    unsigned int sizeOfCentralDir_;
    
    // Offset of start of central directory, relative to start of file.
    unsigned int offsetOfStartOfCentralDir_;
    
    unsigned short commentLength_;
    char* comment_;
};

std::ostream& operator<<(std::ostream& out, EndOfCentralDirectory& endOfCentralDirectory);

#endif	/* ENDFOCENTRALDIRECTORY_H */

